<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../templates/defaultTemplate.xhtml"
                xmlns:c="http://java.sun.com/jsp/jstl/core">
    <ui:define name="top">
        <h:outputLink value="formulaire.xhtml">formulaire</h:outputLink><br/>
    </ui:define>
    <ui:define name="content">
        Pour vous inscrire veuillez remplir les champs suivants :

        <h:form id="registration">
            <h:panelGrid id="panel" columns="3" border="0" cellpadding="0" cellspacing="2">
                <h:outputLabel value="Votre email : "/>
                <h:inputText id="email" value="#{jarjarbean.email}"/>
                <h:outputLabel value="#{jarjarbean.errorEmail}" style="color: red"/>

                <h:outputLabel value="Votre mot de passe : "/>
                <h:inputSecret id="password" value="#{jarjarbean.password1}"/>
                <h:outputLabel value="#{jarjarbean.errorPass1}" style="color: red"/>

                <h:outputLabel value="Votre mot de passe (confirmation) : "/>
                <h:inputSecret id="password2" value="#{jarjarbean.password2}"/>
                <h:outputLabel value="#{jarjarbean.errorPass2}" style="color: red"/>

                <h:outputLabel value="Votre pseudo : "/>
                <h:inputText id="pseudo" value="#{jarjarbean.pseudo}"/>
                <h:outputLabel value="#{jarjarbean.errorPseudo}" style="color: red"/>

                <h:outputLabel value="Votre nom : "/>
                <h:inputText id="name" value="#{jarjarbean.name}"/>
                <h:outputLabel value="#{jarjarbean.errorName}" style="color: red"/>

                <h:outputLabel value="Votre prénom : "/>
                <h:inputText id="firstname" value="#{jarjarbean.firstname}"/>
                <h:outputLabel value="#{jarjarbean.errorFirstName}" style="color: red"/>

                <h:commandButton action="#{jarjarbean.register()}" value="M'inscrire !"/>

            </h:panelGrid>
        </h:form>
    </ui:define>
</ui:composition>